using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace JumpyCat.bamboo
{
    class Rect
    {
        public int x;
        public int y;
        public int width;
        public int height;

        public Rect(int x, int y, int width, int height)
            : base()
        {
            this.x = x;
            this.y = y;
            this.width = width;
            this.height = height;
        }

        public Rect()
        {
            this.x = this.y = this.width = this.height = 0;
        }

        public bool isPointInRect(int x, int y)
        {

            bool inside = true;

            if (x < this.x || (x > this.x + this.width) || y < this.y
                    || y > (this.y + this.height))
            {
                inside = false;
            }

            return inside;
        }
    }
}
